using UnityEngine;

public class AimHelper : MonoBehaviour
{
	public Transform aimTarget;

	public Transform aimPosition;

	public float aimAccuracy;

	public Vector3 Value => (aimTarget.position - base.transform.position).normalized;

	public void JoystickAim(Vector2 value)
	{
		aimTarget.transform.localPosition = new Vector3(0f, value.y, 0f - value.x).normalized * aimAccuracy;
	}

	public void TargetAim(Vector3 targetPosition)
	{
		aimTarget.transform.position = targetPosition;
	}

	private void OnDrawGizmos()
	{
		Gizmos.color = Color.white;
		Gizmos.DrawLine(base.transform.position, aimTarget.transform.position);
	}
}
